using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using clf.weighing.entity;

namespace weighing
{

    public class PermissionVo : BaseVo
    {
        #region Constract
        public Permission mPermission;
        public PermissionVo(Permission permission)
        {
            mPermission = permission;
        }
        #endregion


        public Int64 Id { get { return mPermission.id; } set { mPermission.id = value; OnPropertyChanged(this, nameof(Id)); } }

        /// <summary>
        /// 注释:菜单名称
        /// 可空:YES
        /// </summary>

        public String Name { get { return mPermission.name; } set { mPermission.name = value; OnPropertyChanged(this, nameof(Name)); } }

        /// <summary>
        /// 注释:权限Key
        /// 可空:YES
        /// </summary>

        public String Key { get { return mPermission.key; } set { mPermission.key = value; OnPropertyChanged(this, nameof(Key)); } }

        /// <summary>
        /// 注释:说明
        /// 可空:YES
        /// </summary>

        public String Descript { get { return mPermission.descript; } set { mPermission.descript = value; OnPropertyChanged(this, nameof(Descript)); } }

        /// <summary>
        /// 注释:状态
        /// 可空:YES
        ///默认值:1
        /// </summary>

        public int Status { get { return (int)mPermission.status; } set { mPermission.status = value; OnPropertyChanged(this, nameof(Status)); } }

        /// <summary>
        /// 注释:上一级菜单
        /// 可空:NO
        ///默认值:0
        /// </summary>

        public Int64 Parent { get { return mPermission.parent; } set { mPermission.parent = value; OnPropertyChanged(this, nameof(Parent)); } }

        /// <summary>
        /// 注释:目录级别 越大越小
        /// 可空:YES
        ///默认值:1
        /// </summary>

        public int Level { get { return (int)mPermission.level; } set { mPermission.level = value; OnPropertyChanged(this, nameof(Level)); } }



        #region for ui
        private bool isSelected;
      
        public bool IsSelected
        {
            get { return isSelected; }
            set
            {
                isSelected = value;
                OnPropertyChanged(this, nameof(IsSelected));
            }
        }
        #endregion
    }
}
